function rie = computeRie(i,elements,model)
e = model.getElement(i-1);
f = e.getFace();
xi = e.getGaussPoint(0);
w = e.getGaussWeight(0);
jac = f.jacXAt(xi);
detJac = det(jac);
B = zeros(3,6);
B = e.computeB(f,B,xi);
sigma = elements(i).stress;
rie = w*B'*sigma*abs(detJac);
end
